package chengji;

public class Student  extends Person{
    double scoreEn;
    double scoreMath;
    double scoreCh;
    public double aver(){
        return (scoreCh+scoreMath+scoreEn)/3;
    }//成绩平均分
    public double max(){
        return Math.max(Math.max(scoreCh,scoreMath),scoreEn);
    }
    public double min(){
        return Math.min(Math.min(scoreCh,scoreMath) ,scoreEn);
    }
    public String toString() {
        return
                "姓名" + name + '\t' +
                ", 英语成绩" + scoreEn + '\t' +
                ", 数学成绩" + scoreMath + '\t' +
                ", 语文成绩" + scoreCh + '\t'
                ;
    }

}